//场景常量类

var SceneConst = {};

//scene states const
        
/**
 * 编辑状态，默认 
 */
SceneConst.SCENE_STATE_EDIT         = 0;

/**
 * 拖拽场景中的物体，鼠标在该物体mouseDown进入状态，鼠标mouseUp退出状态，进入编辑状态
 */
SceneConst.SCENE_STATE_DRAG         = 1; 

/**
 * 添加物体到场景中状态，外部选择要添加的物体后进入状态，按ESC键退出状态，进入编辑状态
 */
SceneConst.SCENE_STATE_ADD_OBJECT   = 2;   

/**
 * 重新设置磁贴状态，外部选择要添加的磁贴后进入状态，按ESC键退出状态，进入编辑状态
 */
SceneConst.SCENE_STATE_RESET_TILE   = 3;  

/**
 * 用户观察场景状态，不能编辑
 */
SceneConst.SCENE_STATE_OBSERVE      = 4;  

/**
 * 画机笼状态
 */
SceneConst.SCENE_STATE_DRAW_JILONG  = 5;   

//物品业务类型
SceneConst.OBJECT_TYPE_JIJIA         = 1;//机架
SceneConst.OBJECT_TYPE_DIBAN         = 2;//默认地板
SceneConst.OBJECT_TYPE_LENGTONGDAO   = 3;//冷通道
SceneConst.OBJECT_TYPE_YUZHANJIGUI   = 4;//预占机柜
SceneConst.OBJECT_TYPE_BUKEYONGDIBAN = 5;//不可用地板
SceneConst.OBJECT_TYPE_LIETOUGUI     = 6;//列头柜
SceneConst.OBJECT_TYPE_GONGWEI       = 7;//工位
SceneConst.OBJECT_TYPE_ZHUZI         = 8;//柱子
SceneConst.OBJECT_TYPE_MEN           = 9;//门
SceneConst.OBJECT_TYPE_JILONG        = 10;//机笼
SceneConst.OBJECT_TYPE_WANGXIAN      = 11;//网线

//物品渲染类型
SceneConst.RENDER_TYPE_FLOOR           = "floor";      //地板
SceneConst.RENDER_TYPE_TILE            = "tile";       //瓷砖
SceneConst.RENDER_TYPE_SHADOW_LAYER    = "shadowLayer";//阴影层
SceneConst.RENDER_TYPE_WALL            = "wall";       //墙壁
SceneConst.RENDER_TYPE_BOX             = "box";        //盒型物品
SceneConst.RENDER_TYPE_DOOR            = "door";       //门
//SceneConst.RENDER_TYPE_JILONG          = "jilong";     //机笼

SceneConst.CONNECTOR = "_"; //连接符

//scene layer const
SceneConst.FLOOR_LAYER_NUM     = 0;
SceneConst.TILE_LAYER_NUM      = 1;
SceneConst.SHADOW_LAYER_NUM    = 2;
SceneConst.BOX_LAYER_NUM       = 3;
SceneConst.WALL_LAYER_NUM      = 4;
SceneConst.OTHER_LAYER_NUM     = 29;

//project Layer num const, see constant.js
SceneConst.PROJECT_LAYER_NUM_MIN        = 1;
SceneConst.PROJECT_LAYER_NUM_WENSHIDU   = SceneConst.PROJECT_LAYER_NUM_MIN+0.1;

//scene object const
SceneConst.TILE_LONG    = 0.6;
SceneConst.TILE_WIDTH   = 0.6;

//scene layer y offset const
SceneConst.LAYER_Y_OFFSET       = 0.04;
SceneConst.STAGE_Y_OFFSET       = -SceneConst.LAYER_Y_OFFSET;
SceneConst.FLOOR_Y_OFFSET       = 0;
SceneConst.TILE_Y_OFFSET        = SceneConst.FLOOR_Y_OFFSET + SceneConst.LAYER_Y_OFFSET * SceneConst.TILE_LAYER_NUM;
SceneConst.SHADOW_Y_OFFSET      = SceneConst.FLOOR_Y_OFFSET + SceneConst.LAYER_Y_OFFSET * SceneConst.SHADOW_LAYER_NUM;
SceneConst.TILE_MESH_Y_OFFSET   = SceneConst.TILE_Y_OFFSET + 0.001;

//wall size const
SceneConst.WALL_WIDTH   = 0.3;  //墙壁厚度
SceneConst.WALL_HEIGHT  = 2.5;   //墙壁高度

//door size const
SceneConst.DOOR_WIDTH   = SceneConst.WALL_WIDTH + 0.01;  //门厚度

//jilong size const
SceneConst.JILONG_TOP_LINE_SIZE_2D  = 0.02;  //2d机笼顶边厚度
SceneConst.JILONG_TOP_LINE_SIZE_3D  = 0.02;  //3d机笼顶边厚度
SceneConst.JILONG_LIZHU_SIZE_2D     = 0.1;   //2d机笼立柱厚度
SceneConst.JILONG_LIZHU_SIZE_3D     = 0.04;  //3d机笼立柱厚度
SceneConst.JILONG_HEIGHT            = 2.5;   //机笼高度
SceneConst.JILONG_MAX_DIS           = 0.05;  //判断横平竖直的最大误差距离

//object biz
SceneConst.BIZ_STATE_ONE   = 1;  //看cus 状态决定显示颜色
SceneConst.BIZ_STATE_TWO   = 2;  //变色
        
//object cus biz
SceneConst.CUS_BIZ_STATE_ONE       = 1;
SceneConst.CUS_BIZ_STATE_TWO       = 2;
SceneConst.CUS_BIZ_STATE_THREE     = 3;
SceneConst.CUS_BIZ_STATE_FOUR      = 4;
SceneConst.CUS_BIZ_STATE_FIVE      = 5;
SceneConst.CUS_BIZ_STATE_SIX       = 6;
SceneConst.CUS_BIZ_STATE_SEVEN     = 7;

SceneConst.CUS_BIZ_STATE_ONE_INTRO       = "空闲";
SceneConst.CUS_BIZ_STATE_TWO_INTRO       = "预占";
SceneConst.CUS_BIZ_STATE_THREE_INTRO     = "已分配";
SceneConst.CUS_BIZ_STATE_FOUR_INTRO      = "使用中";
SceneConst.CUS_BIZ_STATE_FIVE_INTRO      = "不可用";
SceneConst.CUS_BIZ_STATE_SIX_INTRO       = "预分配";
SceneConst.CUS_BIZ_STATE_SEVEN_INTRO     = "上电";
SceneConst.CUS_BIZ_STATE_UNKNOWN_INTRO   = "未知";

SceneConst.CUS_BIZ_STATE_ONE_BLEND_COLOR       = "#66CD00";//绿色
SceneConst.CUS_BIZ_STATE_TWO_BLEND_COLOR       = "#104E8B";//深蓝色
SceneConst.CUS_BIZ_STATE_THREE_BLEND_COLOR     = "#BF3EFF";//紫色
SceneConst.CUS_BIZ_STATE_FOUR_BLEND_COLOR      = "#FFC125";//橘红色
SceneConst.CUS_BIZ_STATE_FIVE_BLEND_COLOR      = "#1A1A1A";//黑色
SceneConst.CUS_BIZ_STATE_SIX_BLEND_COLOR       = "#87CEFF";//淡蓝色
SceneConst.CUS_BIZ_STATE_SEVEN_BLEND_COLOR     = "#EE0000";//红色

//porperties
SceneConst.DEFAULT_BLEND_COLOR      = null;
SceneConst.DEFAULT_BLEND_COLOR_NUM  = 1.5;
SceneConst.BIZ_BLEND_COLOR          = "#958b54";
SceneConst.BACKGROUND_COLOR         = "#10264d";

module.exports = SceneConst;